When, Why, What, and How to Index

It's tempting to generate the index as you write the document. Resist the temptation. It is virtually impossible to obtain any consistency in an index that is generated in this way.

An index is there to help the reader find what he's looking for. With this in mind, common sense can help in figuring out what should be in the index and how it should be organized. Since it's often hard to distinguish common sense from equally common nonsense, professional advice is useful. Many style guides discuss indexing; the pamphlet Indexing Your Book by Sina Spiker (The University of Wisconsin Press, 1954) is, according to its subtitle, ``A Practical Guide for Authors''.

Unfortunately, these guides to indexing seem to have been written when high tech meant using a ball-point pen instead of a quill, so their advice on the mechanics of creating an index revolve around how to stack your 3×5 index cards. You'll have to figure out your own method of using the computer to lighten the chore. An alphabetical list of every word in your document, with duplicates removed, is not a bad place to start. If your system has Howard Trickey's delatex program, then the following Unix command generates such a list from the file myfile.tex and puts it on the file foo:

delatex myfile.tex | sort -uf > foo

The computer is only a tool; it can't write the index for you. It may be easy to choose which words are important and mechanically generate an index citing every occurrence of those words, but the resulting index will not be as useful to the reader as one prepared with more care.